package com.by.controller;

import com.by.bean.Customer;
import com.by.common.bean.ResultBean;
import com.by.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class CustomerController {

    @Autowired
    CustomerService service;

    @GetMapping("/customer")
    public ResultBean get(String id){
        Customer customer = service.get(id);
        return new ResultBean(200,"客户信息",customer);
    }
}
